Optimal. Leaf size=167 \[ -\frac {a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{2 \sqrt {2} f}+\frac {2 a^3 \cos ^3(e+f x)}{3 f (a+a \sin (e+f x))^{3/2}}-\frac {4 a^2 \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}-\frac {7 a \sec (e+f x) \sqrt {a+a \sin (e+f x)}}{2 f}+\frac {\sec ^3(e+f x) (a+a \sin (e+f x))^{3/2}}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.65, antiderivative size = 195, normalized size of antiderivative = 1.17, number of steps
used = 14, number of rules used = 9, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {2793, 2726,
2725, 4486, 2754, 2728, 212, 2957, 2934} \begin {gather*} -\frac {a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{2 \sqrt {2} f}-\frac {8 a^2 \cos (e+f x)}{3 f \sqrt {a \sin (e+f x)+a}}-\frac {2 a \cos (e+f x) \sqrt {a \sin (e+f x)+a}}{3 f}+\frac {4 \sec ^3(e+f x) (a \sin (e+f x)+a)^{5/2}}{a f}-\frac {23 \sec ^3(e+f x) (a \sin (e+f x)+a)^{3/2}}{3 f}+\frac {a \sec (e+f x) \sqrt {a \sin (e+f x)+a}}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2725
Rule 2726
Rule 2728
Rule 2754
Rule 2793
Rule 2934
Rule 2957
Rule 4486
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^{3/2} \tan ^4(e+f x) \, dx &=\int (a+a \sin (e+f x))^{3/2} \, dx-\int \sec ^4(e+f x) (a+a \sin (e+f x))^{3/2} \left (1-2 \sin ^2(e+f x)\right ) \, dx\\ &=-\frac {2 a \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}+\frac {1}{3} (4 a) \int \sqrt {a+a \sin (e+f x)} \, dx-\int \left (\sec ^4(e+f x) (a (1+\sin (e+f x)))^{3/2}-2 \sec ^2(e+f x) (a (1+\sin (e+f x)))^{3/2} \tan ^2(e+f x)\right ) \, dx\\ &=-\frac {8 a^2 \cos (e+f x)}{3 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}+2 \int \sec ^2(e+f x) (a (1+\sin (e+f x)))^{3/2} \tan ^2(e+f x) \, dx-\int \sec ^4(e+f x) (a (1+\sin (e+f x)))^{3/2} \, dx\\ &=-\frac {8 a^2 \cos (e+f x)}{3 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}-\frac {\sec ^3(e+f x) (a+a \sin (e+f x))^{3/2}}{3 f}+\frac {4 \sec ^3(e+f x) (a+a \sin (e+f x))^{5/2}}{a f}-\frac {4 \int \sec ^4(e+f x) (a+a \sin (e+f x))^{3/2} \left (\frac {5 a}{2}+3 a \sin (e+f x)\right ) \, dx}{a}-\frac {1}{2} a \int \sec ^2(e+f x) \sqrt {a+a \sin (e+f x)} \, dx\\ &=-\frac {8 a^2 \cos (e+f x)}{3 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}-\frac {a \sec (e+f x) \sqrt {a+a \sin (e+f x)}}{2 f}-\frac {23 \sec ^3(e+f x) (a+a \sin (e+f x))^{3/2}}{3 f}+\frac {4 \sec ^3(e+f x) (a+a \sin (e+f x))^{5/2}}{a f}+a \int \sec ^2(e+f x) \sqrt {a+a \sin (e+f x)} \, dx-\frac {1}{4} a^2 \int \frac {1}{\sqrt {a+a \sin (e+f x)}} \, dx\\ &=-\frac {8 a^2 \cos (e+f x)}{3 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}+\frac {a \sec (e+f x) \sqrt {a+a \sin (e+f x)}}{2 f}-\frac {23 \sec ^3(e+f x) (a+a \sin (e+f x))^{3/2}}{3 f}+\frac {4 \sec ^3(e+f x) (a+a \sin (e+f x))^{5/2}}{a f}+\frac {1}{2} a^2 \int \frac {1}{\sqrt {a+a \sin (e+f x)}} \, dx+\frac {a^2 \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{2 f}\\ &=\frac {a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{2 \sqrt {2} f}-\frac {8 a^2 \cos (e+f x)}{3 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}+\frac {a \sec (e+f x) \sqrt {a+a \sin (e+f x)}}{2 f}-\frac {23 \sec ^3(e+f x) (a+a \sin (e+f x))^{3/2}}{3 f}+\frac {4 \sec ^3(e+f x) (a+a \sin (e+f x))^{5/2}}{a f}-\frac {a^2 \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{f}\\ &=-\frac {a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{2 \sqrt {2} f}-\frac {8 a^2 \cos (e+f x)}{3 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}+\frac {a \sec (e+f x) \sqrt {a+a \sin (e+f x)}}{2 f}-\frac {23 \sec ^3(e+f x) (a+a \sin (e+f x))^{3/2}}{3 f}+\frac {4 \sec ^3(e+f x) (a+a \sin (e+f x))^{5/2}}{a f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 5.38, size = 141, normalized size = 0.84 \begin {gather*} \frac {a \sec ^3(e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2 \sqrt {a (1+\sin (e+f x))} \left (-45+6 \cos (2 (e+f x))+(3+3 i) (-1)^{3/4} \tanh ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (-1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^3+54 \sin (e+f x)+\sin (3 (e+f x))\right )}{6 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.91, size = 139, normalized size = 0.83
method | result | size |
default | \(\frac {\left (1+\sin \left (f x +e \right )\right ) \left (3 a^{\frac {3}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) \left (a -a \sin \left (f x +e \right )\right )^{\frac {3}{2}}-8 a^{3} \sin \left (f x +e \right ) \left (\cos ^{2}\left (f x +e \right )\right )-24 a^{3} \left (\cos ^{2}\left (f x +e \right )\right )-106 \sin \left (f x +e \right ) a^{3}+102 a^{3}\right )}{12 a \left (\sin \left (f x +e \right )-1\right ) \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 260, normalized size = 1.56 \begin {gather*} \frac {3 \, {\left (\sqrt {2} a \cos \left (f x + e\right ) \sin \left (f x + e\right ) - \sqrt {2} a \cos \left (f x + e\right )\right )} \sqrt {a} \log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {a \sin \left (f x + e\right ) + a} {\left (\sqrt {2} \cos \left (f x + e\right ) - \sqrt {2} \sin \left (f x + e\right ) + \sqrt {2}\right )} \sqrt {a} + 3 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \, {\left (12 \, a \cos \left (f x + e\right )^{2} + {\left (4 \, a \cos \left (f x + e\right )^{2} + 53 \, a\right )} \sin \left (f x + e\right ) - 51 \, a\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{24 \, {\left (f \cos \left (f x + e\right ) \sin \left (f x + e\right ) - f \cos \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 974 vs.
\(2 (152) = 304\).
time = 154.08, size = 974, normalized size = 5.83 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {tan}\left (e+f\,x\right )}^4\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________